package com.ffox.service;

import com.ffox.entity.HomeworkProblem;
import com.ffox.entity.HomeworkProblemFile;
import com.ffox.entity.HomeworkResult;
import com.ffox.entity.HomeworkResultFile;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface HomeworkService {
    /*教师部分
     * 布置作业
     * 查看自己布置的所有作业
     * 查看作业对应的答案
     * 为作业答案评分*/

    /*学生部分
     * 查看本班作业
     * 上传作业答案
     * 查看答案评分*/

    Integer insertHomeworkProblem(HomeworkProblem problem, MultipartFile[]  files);

    List<HomeworkProblem> getHomeworkProblemByUserNum(String userNum);


    List<HomeworkResult> getHomeworkResultByProblemId(String problemId);

    Integer updateHomeworkScoreAndTCommentAndCorrectTime(Long score,String tComment,Integer resultId);
    List<HomeworkResultFile> getHomeworkResultFileByResultId(Long resultId);

    List<HomeworkProblemFile> getHomeworkProblemFileByProblemId(Integer problemId);

    List<HomeworkProblem> getHomeworkProblemByClassId(Long classId);

    Integer insertHomeworkResult(HomeworkResult result, MultipartFile[]  files);

    HomeworkResult getHomeworkResult(Integer problemId,String studentNum);
}
